$(function(){
     var img = new Image();
     var url = $('#doc-relative img').attr('src');
     img.src = url;
     if(img.complete) { 
        ajaxRequest('/Home/Advertisement/hotelrest', {}, 'post', function(data) {
            $('#doc-relative .hotel_left').text(data.data);
            $('#doc-relative').find('.hotel_num').removeClass('hidden');
        }, function(data) {
            
        }); 
     }else{
        ajaxRequest('/Home/Advertisement/hotelrest', {}, 'post', function(data) {
            $('#doc-relative .hotel_left').text(data.data);
            $('#doc-relative').find('.hotel_num').removeClass('hidden');
        }, function(data) {
            
        });            
     }  
});
